package com.zmn.oms.zmn.business.interfaces.order;

import com.zmn.mos.common.dio.order.add.nest.UserDIO;
import com.zmn.oms.common.exception.OmsBaseException;
import com.zmn.oms.model.bo.order.GridCompanyQueryBO;
import com.zmn.oms.model.bo.order.OrderBO;
import com.zmn.oms.model.dto.order.ConfirmDTO;
import com.zmn.oms.model.dto.order.GridCompanyInfoDTO;
import com.zmn.oms.model.dto.order.NonClaimOrderDTO;
import com.zmn.oms.model.dto.order.OrderDTO;
import com.zmn.oms.model.dto.product.OrderProductDTO;

import java.util.List;

/**
 * 类描述：zmn 订单
 *
 * @author liuying
 * @date 2018/11/08 10:56
 */
public interface ZsOrderBService {
    /**
     * 订单确认-简单模式
     * 自动确认
     * @param confirmDTO
     * @return
     */
    void confirmOrderSimple(ConfirmDTO confirmDTO);

    /**
     * 订单确认
     * 手动确认
     * @param orderDTO
     * @return
     */
    OrderBO confirmOrder(OrderDTO orderDTO) throws OmsBaseException;

    /**
     * 修改订单
     *
     * @param orderDTO
     * @return
     */
    OrderBO updateOrder(OrderDTO orderDTO) throws OmsBaseException;

    /**
     * 新增订单
     *
     * @param orderDTO
     * @return
     */
    OrderBO insertOrder(OrderDTO orderDTO) throws OmsBaseException;

    /**
     * 修改地址
     *
     * @param orderDTO
     * @return
     */
    OrderBO updateAddress(OrderDTO orderDTO) throws OmsBaseException;

    /**
     * 用户新增不认领订单
     * @param nonClaimOrderDTO
     */
    void insertNonClaimOrder(NonClaimOrderDTO nonClaimOrderDTO);

    /**
     * 获取服务公司信息
     * @param gridCompanyQueryBO
     * @return
     */
    GridCompanyInfoDTO getGridCompanyInfo(GridCompanyQueryBO gridCompanyQueryBO);

    /**
     * 是否有相似取消单
     *
     * @param userDIO
     * @param orderProductList
     * @return
     */
    boolean isHaveSameCancelOrder(UserDIO userDIO, List<OrderProductDTO> orderProductList);

}
